package com.zpark.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @author xiaoyu
 * @version 1.0 2022/9/20
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/login.do")
    public String login(HttpSession session) {
        //往 session 对象中绑定数据
        session.setAttribute("user", "code:200");

        return "登录成功";
    }
}
